import 'dart:math';

import 'package:flutter/material.dart';

class SupportTextHeightUtil {
  static List<int> getSupportTextHeightList(Size size) {
    List<int> list = [];
    if (size.height == 5) {
      list.add(5);
      return list;
    }
    int s = 8;
    double value = min(size.height, size.width);
    while (s <= value) {
      list.add(s);
      s += 2;
    }
    list.add(s);
    return list;
  }

  static int getDefaultTextHeightList(Size size) {
    int height = 12;
    if (size.height == 5) {
      return 5;
    }
    var l = getSupportTextHeightList(size);
    if (l.isNotEmpty) {
      height = l.last;
      height -= 2;
    }
    return height;
  }
}
